package com.itheima.aspect;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

//编写切面类
@Aspect
@Component
public class IdempotentAspect {

    @Pointcut(value = "@annotation(com.itheima.annotation.IdempotentDemo)")
    public void access(){

    }

    @Before("access()")
    public void deBefore(JoinPoint joinPoint) throws Throwable {
        System.out.println("second before");
    }

}
